// 引入初始化样式资源
import '@/styles/common.scss'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
// 引入懒加载指令插件
import { lazyPlugin } from './directives'

// 引入全局组件插件
import { componentPlugin } from './components'

import piniaPluginPerSistedstate from 'pinia-plugin-persistedstate'
import App from './App.vue'
import router from './router'

const app = createApp(App)
const pinia = createPinia()
// 注册全局化插件
pinia.use(piniaPluginPerSistedstate)

app.use(pinia)
app.use(router)
// 注册
app.use(lazyPlugin)
app.use(componentPlugin)

app.mount('#app')
